package com.yt.lxh.dto.product;

import com.yt.lxh.vo.product.TasteListVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.util.List;

@Data
@ApiModel(description = "修改SKU")
public class UpdateSkuDTO {

    @ApiModelProperty(value = "sku ID")
    @NotEmpty(message = "sku ID不能为空")
    private String skuId;

    @ApiModelProperty(value = "sku名称")
    @NotBlank(message = "sku名称不能为空")
    private String skuName;

    @ApiModelProperty(value = "新sku封面路径")
    private MultipartFile newSkuImg;

    @ApiModelProperty(value = "旧sku封面路径")
    private String oldSkuImg;

    @ApiModelProperty(value = "sku描述")
    private String skuDesc;

    @ApiModelProperty(value = "商品单价")
    @NotNull(message = "商品单价不能为空")
    @Digits(integer = 10000000, fraction = 2, message = "商品单价过高")
    @DecimalMin(value = "0.01", message = "商品单价不能小于0.01")
    private BigDecimal price;

    @ApiModelProperty(value = "分类id外键")
    @NotEmpty(message = "分类id不能为空")
    private String categoryId;

    @ApiModelProperty(value = "排序权重")
    private Integer sort;

    @ApiModelProperty(value = "口味Json集合")
    @NotEmpty(message = "请选择口味")
    private List<TasteListVO> tasteText;

    @ApiModelProperty(value = "商品轮播图（没有图片将会用商品图片替代）")
    private List<MultipartFile> banner;

    @ApiModelProperty(value = "旧商品轮播图")
    private List<String> oldBanner;

    @ApiModelProperty(value = "轮播图类型（0：单图 / 1：多图）")
    private Boolean bannerType = false;

    @ApiModelProperty(value = "商品提示")
    private String alert;

    @ApiModelProperty(value = "商品详情内容")
    private String content;

}
